﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataStructure
{
    class Program
    {
        static void Main(string[] args)
        {
            int count = 5;
            JStack<string> j = new JStack<string>(count);
            Console.WriteLine("Begin the JStack");
            Console.WriteLine("The JStack count is {0}",j.Size);
            Console.WriteLine("The JStack is Empty or NOT: " + j.IsEmpty().ToString());
            j.Push("A");
            j.Push("B");
            j.Push("C");
            j.Push("D");
            Console.WriteLine("The JStack is Empty or NOT: " + j.IsEmpty().ToString());
            Console.WriteLine("The JStack Pop item is " + j.Pop().ToString());
            Console.WriteLine("The Top Value is " + j.GetTopValue());
            j.Push("E");
            Console.WriteLine("Adding \"E\" item...");
            Console.WriteLine("The JStack Pop item is " + j.Pop().ToString());
            Console.WriteLine("The Top Value is " + j.GetTopValue());
            Console.WriteLine("The JStack length is " + j.GetLength().ToString());
            Console.ReadLine();
        }
     
    }
    
}
